/*!
 * Bootstrap Colorpicker v2.5.1
 * https://itsjavi.com/bootstrap-colorpicker/
 *
 * Originally written by (c) 2012 Stefan Petre
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 */

.bgImg(@imgBase64) {
  background-image: url("@{imgBase64}");
}

.colorpicker-saturation {
  width: var(--100px);
  height: var(--100px);
  .bgImg('');
  cursor: crosshair;
  float: left;
  i {
    display: block;
    height: var(--5px);
    width: var(--5px);
    border: var(--1px) solid #000;
    position: absolute;
    top: 0;
    left: 0;
    margin: -4px 0 0 -4px;
    b {
      display: block;
      height: 5px;
      width: 5px;
      border: var(--1px) solid #fff;
    }
  }
}

.colorpicker-hue,
.colorpicker-alpha {
  width: var(--15px);
  height: var(--100px);
  float: left;
  cursor: row-resize;
  margin-left: 4px;
  margin-bottom: 4px;
}

.colorpicker-hue i,
.colorpicker-alpha i {
  display: block;
  height: var(--1px);
  background: #000;
  border-top: var(--1px) solid #fff;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin-top: var(--minus-1px);
}

.colorpicker-hue {
  .bgImg('');
}

.colorpicker-alpha {
  .bgImg('');
  display: none;
}

.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-alpha {
  background-size: contain;
}

.colorpicker {
  padding: var(--4px);
  min-width: var(--128px);
  margin-top: var(--1px);
  z-index: 2500;
}

.colorpicker:before,
.colorpicker:after {
  display: table;
  content: "";
  line-height: 0;
}

.colorpicker:after {
  clear: both;
}

.colorpicker:before {
  content: '';
  display: inline-block;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: var(--minus-7px);
  left: var(--6px);
}

.colorpicker:after {
  content: '';
  display: inline-block;
  border-left: var(--6px) solid transparent;
  border-right: var(--6px) solid transparent;
  border-bottom: var(--6px) solid #ffffff;
  position: absolute;
  top: var(--minus-6px);
  left: var(--7px);
}

.colorpicker div {
  position: relative;
}

.colorpicker.colorpicker-with-alpha {
  min-width: calc(var(--100px) + var(--40px));
}

.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
  display: block;
}

.colorpicker-color {
  height: var(--10px);
  margin-top: var(--5px);
  clear: both;
  .bgImg('');
  background-position: 0 100%;
}

.colorpicker-color div {
  height: var(--10px);
}

.colorpicker-selectors {
  display: none;
  height: var(--10px);
  margin-top: var(--5px);
  clear: both;
}

.colorpicker-selectors i {
  cursor: pointer;
  float: left;
  height: var(--10px);
  width: var(--10px);
}

.colorpicker-selectors i + i {
  margin-left: var(--3px);
}

.colorpicker-element .input-group-addon i,
.colorpicker-element .add-on i {
  cursor: pointer;
  height: var(--16px);
  width: var(--16px);
}

.colorpicker.colorpicker-inline {
  position: relative;
  display: inline-block;
  float: none;
  z-index: auto;
}

.colorpicker.colorpicker-horizontal {
  width: calc(var(--100px) + var(--10px));
  min-width: calc(var(--100px) + var(--10px));
  height: auto;
}

.colorpicker.colorpicker-horizontal .colorpicker-saturation {
  margin-bottom: var(--4px);
}

.colorpicker.colorpicker-horizontal .colorpicker-color {
  width: var(--100px);
}

.colorpicker.colorpicker-horizontal .colorpicker-hue,
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
  width: var(--100px);
  height: var(--15px);
  float: left;
  cursor: col-resize;
  margin-left: 0;
  margin-bottom: var(--4px);
}

.colorpicker.colorpicker-horizontal .colorpicker-hue i,
.colorpicker.colorpicker-horizontal .colorpicker-alpha i {
  display: block;
  height: var(--15px);
  background: #ffffff;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--1px);
  border: none;
  margin-top: 0;
}

.colorpicker.colorpicker-horizontal .colorpicker-hue {
  .bgImg('');
}

.colorpicker.colorpicker-horizontal .colorpicker-alpha {
  .bgImg('');
}

.colorpicker-right:before {
  left: auto;
  right: var(--6px);
}

.colorpicker-right:after {
  left: auto;
  right: var(--7px);
}

.colorpicker-no-arrow:before {
  border-right: 0;
  border-left: 0;
}

.colorpicker-no-arrow:after {
  border-right: 0;
  border-left: 0;
}

.colorpicker,
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-selectors {
  &.colorpicker-visible {
    display: block;
  }
}

.colorpicker,
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-selectors {
  &.colorpicker-hidden {
    display: none;
  }
}

.colorpicker-inline.colorpicker-visible {
  display: inline-block;
}
